<!doctype html>
<html class="no-js fixed-layout">
<head>
     <%
    include("/common/inc/meta.html"){}
    %>
    <title>管理员新增(编辑)</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<%
layout("/common/layout/layout.html",{'menu':'user'}){
%>

<div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">权限</strong> / <small>新增(编辑)</small></div>
</div>
 <div class="am-g">
 		<%
	    include("/common/inc/form_msg.html"){}
	  %>
      <form method="post" class="am-form" action="${ctxPath}/admin/permission/${action!}" >
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             权限名称
            </div>
            <div class="am-u-sm-8 am-u-md-4">
              <input type="text" class="am-input-sm" name="authName" value="${permission.authName!''}" placeholder="权限名" required>
            </div>
            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
          </div>
          
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
              地址URL
            </div>
            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
              <input type="text" class="am-input-sm" name="authUrl" value="${permission.authUrl!''}">
            </div>
          </div>
          
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
              类型
            </div>
            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
               <select data-am-selected="{btnSize: 'sm'}">
	              <option value="1" <%if(permission.authType!''==0){print("selected");}%>>菜单</option>
	              <option value="0" <%if(permission.authType!''==1){print("selected");}%>>操作</option>
	            </select>
            </div>
          </div>         
               
		<div class="am-margin">
			<input type="hidden" name="id" value="${permission.id!''}"/>
			<input type="hidden" name="token" value="${session.token!''}"/>
		    <button type="submit" class="am-btn am-btn-primary am-btn-xs">保存</button>
		    <a type="button" class="am-btn am-btn-primary am-btn-xs" href="${ctxPath}/admin/permission">返回权限列表</a>
		  </div>
        </form>
 </div>

<%}%>

<%
    include("/common/inc/js.html"){}
    %>
</body>
</html>